package com.share51.novel.service;

import org.springframework.core.io.FileSystemResource;
import org.springframework.http.ResponseEntity;
import org.springframework.ui.Model;

import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;

/**
 * 页面请求数据处理
 *
 * @author gb
 */
public interface PageService {


    /**
     * 下载小说
     * @param novelId
     * @param request
     * @return
     * @throws UnsupportedEncodingException
     */
    ResponseEntity<FileSystemResource> download(Integer novelId, HttpServletRequest request) throws UnsupportedEncodingException;

    /**
     * 前往首页
     *
     * @param model
     */
    void toIndex(Model model);
}
